from apps.a_common.error import ER, AppError


class RepeatedUsername(AppError):
    def __init__(self, fields=None):
        super(RepeatedUsername, self).__init__(error_record=ER.REPEATED_USERNAME, fields=fields)


class ConfirmPasswordFail(AppError):
    def __init__(self, fields=None):
        super(ConfirmPasswordFail, self).__init__(error_record=ER.CONFIRM_PASSWORD_FAIL, fields=fields)


class WrongPassword(AppError):
    def __init__(self, fields=None):
        super(WrongPassword, self).__init__(error_record=ER.WRONG_PASSWORD, fields=fields)
